package com.zjh.photoshopstudy.Utils;

import android.app.Application;
import android.content.Context;
import android.os.Environment;

import com.lzy.okgo.OkGo;
import com.lzy.okserver.OkDownload;
import com.lzy.okserver.OkUpload;

import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;
import org.quartz.SimpleScheduleBuilder;
import org.quartz.Trigger;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;


public class App extends Application {
    private static Context context;
    @Override
    public void onCreate() {
        super.onCreate();
        initOkGo();
        context = getApplicationContext();
    }

    private void initOkGo() {
        OkGo.getInstance().init(this);
        OkDownload.getInstance().setFolder(Environment.getExternalStorageDirectory().getAbsolutePath() + "/aaa/");
        OkDownload.getInstance().getThreadPool().setCorePoolSize(3);
        OkUpload.getInstance().getThreadPool().setCorePoolSize(3);
    }

    public static Context getContext() {
        return context;
    }
}
